      <!-- Page Content -->
        <div id="page-wrapper">
            <div class="container-fluid">
             <div class="row">
                    <div class="col-lg-12">
                        <h2 class="page-header">分类管理</h2>
                    </div>
                    <!-- /.col-lg-12 -->
                </div>
                <!-- /.row -->
                <div class="row">
                    <div class="col-lg-12">
                              <div class="panel panel-default">
                        <div class="panel-heading">
                            修改产品分类  <?php if(isset($parent)){?><a href="<?=site_url()?>categories/viewCategory/<?=$parent->parent_id?>"><i class="fa fa-caret-left"></i> <?=$parent->name_cn?></a> <?php }?> <a class="btn btn-default btn-sm pull-right" href="<?=site_url()?>categories/viewCategory/<?=$cat->parent_id?>"><i class="fa fa-arrow-left"></i> 返回</a>
                       		<div class="clearfix"></div>
                        </div>
                        <!-- /.panel-heading -->
                        <div class="panel-body">      
                        <?php if(isset($msg)){?>
                        <?php foreach ($msg as $m):?>
                        	<?php foreach ($m as $s):?>
                        <?php if($s['code']==1){?>
						<div class="alert alert-success">
						<?=$s['msg']?>
						</div>
						<?php }elseif($s['code']==2){?>
						<div class="alert alert-warning">
						<?=$s['msg']?>
						</div>
						<?php }else{?>
						<div class="alert alert-danger">
						<?=$s['msg']?>
						</div>
						<?php }?>
						<?php endforeach;?>
						<?php endforeach;?>
						<?php }?>
                        <form action="<?=current_url()?>" method="post">
							<div class="col-lg-4">
								<div class="panel panel-default">
									<div class="panel-heading">分类列表</div>
									<div class="panel-body">
										<div class="catListRadio">

											<div class="form-group">
											<?=form_error('cat_id'); ?>
												<ul class="list-unstyled">
													<li><div class="radio"><label><input type="radio" name="cat_id"  value="<?=$firstLevel->id?>" <?php if($firstLevel->id == $cat->parent_id){?>checked="checked"<?php }?>><i class="fa fa-folder-open"></i> <?=$firstLevel->name_cn?></label></div></li>
												<?=$category?>
												</ul>
											</div>
										</div>
									</div>
								</div>
							</div>

							<div class="col-lg-5">
								<div class="panel panel-default">
									<div class="panel-heading">分类信息</div>
									<div class="panel-body">
										<div class="form-group">
											<label>中文 *</label> <input type="text" name="name_cn"
												value="<?=set_value('name_cn',$cat->name_cn)?>"
												class="form-control">
												<?=form_error('name_cn'); ?>
										</div>
										<div class="form-group">
											<label>EN *</label> <input type="text" name="name_en"
												value="<?=set_value('name_en',$cat->name_en)?>"
												class="form-control">
												<?=form_error('name_en'); ?>
										</div>
										<div class="form-group">
											<label>NL *</label> <input type="text" name="name_nl"
												value="<?=set_value('name_nl',$cat->name_nl)?>"
												class="form-control">
												<?=form_error('name_nl'); ?>
										</div>
										<hr>
										<div class="form-group">
											<label>Description EN </label>
											<textarea class="form-control" rows="3" name="text_en"><?=$cat->text_en?></textarea>
										</div>
										<div class="form-group">
											<label>Description NL </label>
											<textarea class="form-control" rows="3" name="text_nl"><?=$cat->text_nl?></textarea>
										</div>
										<hr>
										<div class="form-group pull-right">
											<button class="btn btn-primary btn-sm" type="submit">修改</button>
										</div>
									</div>
								</div>
							</div>
							</form>
							<div class="col-lg-3">
					<div class="panel panel-default">
					<div class=" panel-heading">
						缩略图
					</div>
					<div class="panel-body">
					<?php if($cat->thumb){?>
					<a href="#" class="thumbnail">
      <img src="<?=base_url()?>../uploads/catThumbs/<?=$cat->thumb?>" alt="...">
    </a>
    <div class="form-group ">
    <button type="button" class="btn btn-danger btn-sm" onclick="deleteCatThumb(<?=$cat->id?>)">删除</button>
    </div>
					<?php }else{?>
						<a href="#" class="thumbnail">
      <img src="<?=base_url()?>../uploads/no-image.png" alt="">
    </a>
					<?php }?>
					<hr>
					<form role="form" action="<?=site_url('categories/addThumb')?>" method="post" enctype="multipart/form-data">
						<input name="category_id" type="hidden" value="<?=$cat->id?>">
						<input type="file" name="userfile" size="20">
						<br>
						(准许文件类型: png | jpg, 最大1 Mo)
						<div class="form-group ">
						<button class="btn btn-primary btn-sm pull-right" type="submit" >上传</button>
						</div>
					</form>
					</div>
		</div>			
                            </div>
                            
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                    </div>
                    <!-- /.col-lg-12 -->
                </div>
                <!-- /.row -->              
                
            </div>
        </div>
       